home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / mini / Jaz-Drive < prev    next >
Text File  |  1997-06-18  |  15KB  |  399 lines

  1.  
  2.   JAZ-drive mini-HOWTO
  3.   Bob Willmot, bwillmot@cnct.com
  4.   v1.6, 04 June 1997
  5.  
  6.     
  7.   This HOWTO covers the configuration and use of the Iomega Jaz drive
  8.   under Linux and software tools available for the drive.
  9.  
  10.   1.  Introduction
  11.  
  12.   The Iomega Jaz drive is a removable media disk drive whose disks
  13.   have a capacity of 1021 megabytes. It is currently available in internal
  14.   and external SCSI configurations.  Iomega plans to release an internal 
  15.   IDE version.
  16.  
  17.   This document describes how to use the Jaz drive with Linux.  Since
  18.   this is a SCSI device, it is important for you to read the Drew Eckhardt's
  19.   SCSI HOWTO as well.  
  20.   http://sunsite.unc.edu/pub/Linux/docs/HOWTO/SCSI-HOWTO
  21.  
  22.   I'd like to thank the following people for their contributions and info
  23.   they've provived.
  24.  
  25.     * Grant Gunther, grant@torque.net
  26.     * Tom Poindexter, tpoindex@nyx.net
  27.     * Todd Woods, woods@cs.uiowa.edu
  28.     * Richard B. Melrose, rbm@math.mit.edu
  29.     * Phil Howard, phil@charon.milepost.com
  30.         * Rick Niess, rniess@ocean.st.usm.edu
  31.  
  32.   If you have any comments/suggestions/corrections please send them to:
  33.   Bob Willmot, bwillmot@cnct.com
  34.  
  35.  
  36.   2.  The Jaz disks
  37.  
  38.   The Jaz disks (cartridges) resemble a stack of three 3.5" floppy disks
  39.   that hold 1GB of data.  
  40.  
  41.   The drive has a motorized mechanism that can eject the disk via
  42.   a pushbutton on the from of the drive or through software (see 
  43.   below on info about the jaztools Linux software)
  44.  
  45.  
  46.   2.1.  The Jaz Jet host adapter
  47.  
  48.   Iomega markets a SCSI host adapter under the name Jaz Jet.  
  49.  
  50.   Aparently there are currently two versions of this controller available,
  51.   based on two difference SCSI chipsets.
  52.  
  53.   One is based on the Adaptec 7800 family of adapters, and is compatible
  54.   with the 2930/2940 host adapters. Linux 2.0 supports this adapter with 
  55.   the aic7xxx driver. (this driver was introduced in the 1.3.? version of 
  56.   the kernel).
  57.  
  58.   The other adapter is based on the Advanced Systems chipset.  At boot time
  59.   the board gives a message like
  60.     Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996    
  61.   Compile the kernel with the CONFIG_SCSI_ADVANSYS variable set. 
  62.  
  63.  
  64.   3.  Configuring a kernel for the Jaz drive
  65.  
  66.   To use the Jaz drive with Linux, you must have a kernel configured
  67.   for you SCSI adapter.
  68.  
  69.   Info on building the kernel can be found in the /usr/src/linux/README
  70.   file, or in /usr/src/linux/Documentation/ directory for the 2.x kernels.
  71.  
  72.   Also check out Brian Ward's Kernel-HOWTO
  73.   http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Kernel-HOWTO
  74.   
  75.  
  76.   4.  Identifying the drive at boot time
  77.  
  78.   When your system boots it should display information about your adapter,
  79.   and any disks that arre attaced to the drive.
  80.  
  81.   Boot messages will vary depending on your SCSI adapter and are logged
  82.   to the /var/log/messages (or /var/adm/messages) file.  You can also
  83.   'replay' these messages from the command prompt with the dmesg command.
  84.  
  85.   Here's the kernel booting output from a 2.0.10 kernel with an 
  86.   Adaptec 2940 controller:
  87.  
  88.     aic7xxx: BurstLen = 8 DWDs, Latency Timer = 64 PCLKS
  89.     aic7xxx: AHA-2940 Ultra Rev B.
  90.     aic7xxx: devconfig = 0x580.
  91.     aic7xxx: Reading SEEPROM...done.
  92.     aic7xxx: Extended translation enabled.
  93.     aic7xxx: Using 16 SCB's after checking for SCB memory.
  94.     AHA-2940 Ultra (PCI-bus):
  95.         irq 11
  96.         bus release time 40 bclks
  97.         data fifo threshold 100%
  98.         SCSI CHANNEL A:
  99.             scsi id 7
  100.             scsi selection timeout 256 ms
  101.             scsi bus reset at power-on enabled
  102.             scsi bus parity enabled
  103.             scsi bus termination (low byte) enabled
  104.     aic7xxx: Downloading sequencer code...done.
  105.     aic7xxx: Resetting the SCSI bus...done.
  106.     scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 3.2/3.1/3.0
  107.     scsi : 1 host.
  108.     aic7xxx: Scanning channel A for devices.
  109.     aic7xxx: Target 4, channel A, now synchronous at 10.0MHz, offset(0xf).
  110.       Vendor: iomega    Model: jaz 1GB           Rev: G.60
  111.       Type:   Direct-Access                      ANSI SCSI revision: 02
  112.     Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
  113.     scsi : detected 1 SCSI disk total.
  114.     SCSI device sda: hdwr sector= 512 bytes. Sectors= 2091050 [1021 MB] [1.0 GB]
  115.     sda: Write Protect is off
  116.  
  117.  
  118.   In the above log note the raw scsi device name (sda,sdb, etc).  
  119.   You'll need to use this to access the disk later.
  120.  
  121.   If these lines do not appear, then something is misconfigured in your
  122.   hardware or in the kernel.
  123.  
  124.   If the scsi0: line does not appear, then you have not configured your
  125.   host adapter and its driver correctly.  Some drivers will give you a
  126.   hint about what is wrong.   If your drive is not detected, you
  127.   probably have a cable problem.  If a drive name is not assigned, you
  128.   probably forgot to include SCSI disk support when you built the
  129.   kernel.
  130.  
  131.   Check the README files in drivers/scsi and the SCSI HOWTO for other
  132.   debugging hints.
  133.  
  134.   4.2.  Fdisk, mke2fs, mount, etc.
  135.  
  136.   Once you know the drive name for your Jaz drive, you are set.  You can
  137.   manipulate the drive with the normal Linux disk management commands,
  138.   fdisk, mke2fs, mount etc.  
  139.  
  140.   Refer to the manual pages for these programs.
  141.  
  142.  
  143.   4.2.1.  An existing DOS formatted disk
  144.  
  145.   Disks factory formatted from Iomega are partitioned with a single 
  146.   partition (for some unknown reason they use the 4th partition).
  147.  
  148.   You can mount this disk (assuming your jaz disk is the raw SCSI device
  149.   sda) with the commands 
  150.  
  151.        mkdir /jaz
  152.        mount -t msdos /dev/sda4 /jaz
  153.  
  154.   Or if you are using the 2.0 kernels and have compiled the kernel with
  155.   support for the Win95 VFAT support you can mount it with
  156.  
  157.        mkdir /jaz
  158.        mount -t vfat /dev/sda4 /jaz
  159.  
  160.   (this will allow you to read/write long filenames)
  161.  
  162.   Files from the disk will appear in /jaz. While the disk is
  163.   mounted, you will not be able to eject it.
  164.  
  165.   To unmount the drive you can issue the command:
  166.  
  167.        umount /dev/sda4
  168.  
  169.   Once you've made the /jaz mount point - you don't need to do it again,
  170.   (also make sure your not in the /jaz dir when you try to umount the 
  171.   drive)
  172.  
  173.  
  174.   4.2.2.  Re-format as a native Linux disk
  175.  
  176.   If you want to erase a Jaz disk and make a Linux native file system on
  177.   it.  you should use fdisk on the entire disk:
  178.  
  179.        fdisk /dev/sda
  180.  
  181.   and delete any existing partitions (with the d command).  Then create
  182.   a new partition with the n command, make it primary partition number
  183.   1, use w to write the partition table to disk, and quit with q.
  184.  
  185.   Format the partition
  186.  
  187.        mke2fs /dev/sda1
  188.  
  189.   (The 1 is the number that you gave this partition in fdisk).  Now you
  190.   can mount the disk:
  191.  
  192.        mount -t ext2 /dev/sda1 /jaz
  193.  
  194.   (re-using that mount point we created before).
  195.  
  196.   4.2.3.  The Jaz Tools disk
  197.  
  198.   There is some extra work to be done if you want to use the disk that
  199.   comes with the Jaz drive.  As shipped, the software controlled write
  200.   protection is enabled.  
  201.  
  202.   There are two options here: you can unlock the disk under DOS or
  203.   Windows with the "reclaime.exe" program (or by installing the tools
  204.   from the setup program) or you can unlock the disk with my jaztools
  205.   program (see section 5) with the command 
  206.  
  207.     jaztool /dev/sda rw
  208.  
  209.   (adjust the /dev/sda to your appropriate SCSI device) and when prompted
  210.   for the password enter
  211.  
  212.     APlaceForYourStuff
  213.  
  214.   5.  jaztools
  215.  
  216.   A native Linux program to support some of Iomega's special features 
  217.   (including software controlled ejection and write protection)
  218.   is available at 
  219.     
  220.     http://www.cnct.com/~bwillmot/jaztool/
  221.  
  222.   There should be a new version of jaztool available shortly that will
  223.   contain a GUI interface and support drive scanning and automated
  224.   mounting and unmounting of disks.
  225.  
  226.  
  227.   6.  Frequently asked questions
  228.  
  229.  
  230.   6.1.  I can only mount the Jaz tools disk read-only
  231.  
  232.   The tools disk is shipped in a special password-protected read-only 
  233.   mode.  To unlock the disk run the "reclaim.exe" program under 
  234.   DOS or Windows or use the native linix jaztools program (see section 5) 
  235.   with the command 
  236.  
  237.     jaztool /dev/sda rw
  238.  
  239.   (adjust the /dev/sda to your appropriate SCSI device) and when prompted
  240.   for the password enter
  241.  
  242.     APlaceForYourStuff
  243.   
  244.  
  245.   6.2.  The Jaz locks my system after it spins down ?
  246.  
  247.   I have a feeling that this may be related to the Jaz firmware.  Anyone
  248.   who has this problem, let me know what Revision your drive is.  To determine
  249.   Jaz rev check the output of the /etc/dmesg program for some lines like:
  250.  
  251.     scsi0: Target 4, channel A, now synchronous at 10.0MHz, offset 15.
  252.       Vendor: iomega    Model: jaz 1GB           Rev: G.60
  253.       Type:   Direct-Access                      ANSI SCSI revision: 02
  254.     
  255.   This apparently happens only under one specific circumstance that the 
  256.   average Linux user is unlikely to encounter.  When the Jaz drive has a 
  257.   partition/filesystem mounted, the drive spins down with the filesystem 
  258.   still mounted, and an attempt is made while the drive is still idle to 
  259.   read from the block device.  It appers that Linux attempts to read the MBR
  260.   again to restablish the partitions, but somehow this fails _sometimes_ and
  261.   leaves the device in an apparently busy state.  Both the kernel read for 
  262.   the MBR and the process device read will fail and this failure may be due 
  263.   to a lockout or busy status.   In this state it thinks it is still reading 
  264.   even though no I/O is pending or operating.  I've had this happen mostly when
  265.   block device reading the MBR itself
  266.  
  267.   6.3.  Can I boot from the Jaz drive ?
  268.  
  269.   The Jaz drive can select any SCSI target ID from 0-6.
  270.  
  271.   If the Jaz drive co-exists with other SCSI harddrives, most BIOSes will
  272.   want to boot the lowest SCSI id that is a disk.  Some detected and skip
  273.   removeable devices like the Jaz.
  274.  
  275.   If the Jaz drive co-exists with IDE harddrives, nearly every BIOS will
  276.   want to boot the first IDE harddrive.  Some BIOSes will allow removing
  277.   the first IDE device from the configuration and will assign the first
  278.   SCSI device as the boot device (Bios 0x80).  Others may require removing
  279.   all IDE devices from configuration.  Still others may require detaching
  280.   the IDE drives physically or disabling the IDE interface.
  281.  
  282.   6.4.  Why does Iomega use partition number 4 ?
  283.  
  284.   Partition 4 is the default partition used by Macintosh.  
  285.  
  286.   On a Mac, the first partition is reserved for boot info, the second for
  287.   system info, the third is the resource fork, and the fourth is the data
  288.   fork.
  289.  
  290.   Anyway, PCs and most other systems can deal with having to work on the 
  291.   4th partition whereas the Mac can't deal with anything else.  Iomega 
  292.   sends all their preformatted media with partition 4 used so that both 
  293.   PC's and Macs can read them and everyone avoids a big compatibility
  294.   headache. (PCs with mac-disk-reading software usually expect the data
  295.   to be on partition 4)
  296.  
  297.   6.5.  How can I have the disk mounted at boot time ?
  298.  
  299.   All you need to do is to add a line to your /etc/fstab file.  For
  300.   instance, if you will always have a DOS disk in the drive when you
  301.   boot, you could put
  302.  
  303.        /dev/sda4   /jaz  msdos  defaults  0 0
  304.  
  305.   in the fstab.  Depending on your distribution, the initialization
  306.   scripts might try to run fsck on partitions listed in your fstab.  Be
  307.   aware that this could cause problems if you forget to put the disk in
  308.   the drive when you boot, or have the wrong disk there.
  309.  
  310.   To eliminate these problems you can add a separate mount command in 
  311.   /etc/rc.d/rc.local to mount the Jaz drive.  This will avoid problems 
  312.   with the standard "mount -a" that takes place when there is no cartridge 
  313.   in the drive.
  314.  
  315.   6.6.  What happens if there is no disk inserted when I boot ?
  316.  
  317.   The kernel will try to read the partition table, but the operation
  318.   will (eventually) time out.
  319.  
  320.   When you change disks, it is a good idea always to use fsck to
  321.   check the partition structure on the new disk.
  322.  
  323.   The BIOS on some SCSI host adapters will attempt to read the partition
  324.   table on your disk during the system boot.  If you cannot disable this
  325.   check, you may be forced always to boot with a disk in the drive.
  326.  
  327.   6.7.  How can I make my Jaz cartridge self-bootable (assuming my BIOS 
  328.   is set up to allow it?)
  329.  
  330.   The Jaz drive/cartridge makes an excellent ERD (Emergency Repair Disk).
  331.   It's also fun to be able to just pop in some new Linux system or to try
  332.   Linux on someone else's Jaz-equipped machine.
  333.  
  334.   You could just follow the install procedure for your favorite distribution
  335.   with the Jaz drive being the only drive on the system.
  336.  
  337.   However if you want to do an "install" from your running system, you can
  338.   often succeed in "building" a self-bootable system on a Jaz cartridge.
  339.  
  340.   Step 1 - partition the drive and make the filesystems.  You probably
  341.   need to have a swap partition, too, but if you have lots of RAM then maybe
  342.   not.  Mount the new root as /jaz and any additional partitions within that
  343.   directory as appropriate.
  344.  
  345.   Step 2 - copy all the files into place.  Be sure all the /dev files
  346.   are copied.  Be sure all permissions, ownership and groupids are retained.
  347.  
  348.   Step 3 - modify the files on the Jaz cartridge to suit the circumstances
  349.   of booting from it.  In particular be sure to change /jaz/etc/fstab to mount
  350.   the Jaz cartridge partition(s) as appropriate.  Also change /jaz/etc/lilo.conf
  351.   to match as well.
  352.  
  353.   Step 4  - there are two alternatives:
  354.  
  355.     A: make a kernel image floppy and use "rdev" to make it mount the Jaz
  356.     cartridge as root.  Boot from the floppy when ready the first time
  357.     then run lilo to make the Jaz MBR bootable.
  358.  
  359.     B: you can run lilo from your non-Jaz root running system to install the
  360.     bootable MBR on the Jaz cartridge.  Add these lines (change "1" to your
  361.     root partition number and "sda" to your Jaz device name as appropriate)
  362.     to your /jaz/etc/lilo.conf file before the first system definition:
  363.  
  364.        drive = /dev/sda1
  365.        bios = 0x80
  366.  
  367.   When you are all ready to install the Jaz MBR, you run lilo with the
  368.   -r option to make it operate within the /jaz tree as if it is /.  The
  369.   command looks like:
  370.  
  371.      lilo -r /jaz
  372.  
  373.   Normally lilo searches for what the bios device number of the boot
  374.   device will be at boot time.  This needs to be overridden since the
  375.   Jaz drive is not currently the bootable one.  The 2 added lines do
  376.   this.
  377.  
  378.   There will be a number of error messages output by lilo and the kernel.
  379.   Lilo is warning you there may be problems which will not be in this
  380.   case.  The kernel reports problems related to /dev/hdc which are due
  381.   to probes for devices that lilo is doing trying to discover some things.
  382.   Lilo tries to make a device node for the old major/minor code for "hdc"
  383.   and the kernel is recognizing the attempt as an error.  These messages
  384.   can be ignored.  Watch the Jaz drive light to see it being written to.
  385.  
  386.   At this point your Jaz drive should be bootable.
  387.   
  388.  
  389.   7.  Getting more current information
  390.  
  391.   The most up-to-date version of this mini-HOWTO can be found at:
  392.  
  393.        http://www.cnct.com/~bwillmot/jaztool/
  394.  
  395.   Iomega's web pages are at
  396.  
  397.        http://www.iomega.com/
  398.  
  399.